#!/usr/bin/env osascript

on move_to_next_space()
--move to next desktop
tell application "System Events"
	tell application "System Events" to key code 124 using control down
	activate
	delay 2
end tell
end move_to_next_space

on open_terminal(x, y, r, c)
	using terms from application "Terminal"
			tell application "Terminal"
				do script "pwd"
		        tell application "System Events" to keystroke "t" using {command down}

				activate
				set position of window 1 to {x, y}
				
				set number of rows of window 1 to r
				set number of columns of window 1 to c
			end tell
	end using terms from
end open_terminal

(*
tell application "Google Chrome"
    activate 
    open location "https://www.google.com"
end tell

move_to_next_space()
*)

---------------------------------------------------------
--open terminal
set xx to 870
set yy to 458

--open_terminal(xx, 0, 24, 80)
--open_terminal(xx, yy, 24, 80)
--open_terminal(0, 0, 70, 198)

--move_to_next_space()

open_terminal(0, 0, 24, 80)
open_terminal(870, 0, 24, 80)
open_terminal(0, 458, 24, 80)
open_terminal(870, 458, 24, 80)


